'use strict';

const Controller = require('egg').Controller;

class WeappController extends Controller {
  async login() {
    const { ctx } = this;
    const code = ctx.request.body.code;
    if (code) {
      ctx.body = { token: `${code}1234` };
    } else {
      ctx.body = {};
    }
  }
}

module.exports = WeappController;
